GXSetShapeType
You can use theGXSetShapeType
function to convert a shape object from one shape type to another.
void GXSetShapeType(gxShape target, gxShapeType newType);
target
- A reference to the shape object to assign the new shape type to.
newType
- A reference to the shape type to be assigned to the shape.
DESCRIPTION
TheGXSetShapeType
function changes the type of the target shape to the shape type specified bynewType
. Many different kinds of conversions are possible: typographic types can be converted to other typographic types or to graphic types; graphic types can be converted to other graphic types. The results of the conversion differ in each case, depending on which type is converted to which other type. See Table 2-5 on page 2-33 for a list of chapters that describe how conversion works for different shape types.ERRORS, WARNINGS, AND NOTICES
When you change a shape to a bitmap type, the GXSetShapeType function performs preliminary calculations on its data and thus may post, in addition to the errors listed below, errors associated with theGXDrawShape
function. When you change a shape to a typographic type, GXSetShapeType may post font-related errors.
Errors out_of_memory shape_is_nil illegal_type_for_shape (debugging version) shape_access_not_allowed (debugging version) Warnings new_shape_contains_invalid_data (debugging version) Notices (debugging version) shape_type_already_set SEE ALSO
What happens when you callGXSetShapeType
to convert shapes of one type to another is described in Inside Macintosh: QuickDraw GX Graphics and Inside Macintosh: QuickDraw GX Typography. Table 2-5 on page 2-33 shows which specific chapters to read for detailed information on conversion among the various types of shapes.Shape types are described in the section "Shape Type" beginning on page 2-9 of this chapter.
To determine the shape type of a shape object, use the GXGetShapeType function, described in the previous section.